<template>
  <a-page>
    <div slot="nav">
      <div class="row justify-center">
        <div class="col-xl-8 col-lg-9 row items-center justify-center">
          <q-tabs color="" text-color="black" align="justify" :class="{'col-12': $q.screen.lt.md}">
            <q-route-tab :to="getPath('map')" label="地图"/>
            <q-route-tab :to="getPath('forum')" label="讨论"/>
            <q-route-tab :to="getPath('user')" label="用户"/>
          </q-tabs>
        </div>
      </div>
    </div>
    <div class="row justify-center"><router-view/></div>
  </a-page>
</template>

<script>
  export default {
    name: 'pageSearch',
    props: {
      // key: {
      //   type: String,
      //   required: false
      // }
    },
    data () {
      return {
      }
    },
    created () {
    },
    watch: {
    },
    methods: {
      getPath (type) {
        const path = this.$route.path

        const toPath = path.replace(/^\/search\/(\S+)\//, `/search/${type}/`)

        return toPath
      }
    }
  }
</script>

<style lang="stylus">
</style>
